!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[MediaPlayer_videoBox]",["react"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[MediaPlayer_videoBox]"]=t(require("react")):e["rb_wixui.thunderbolt[MediaPlayer_videoBox]"]=t(e.React)}("undefined"!=typeof self?self:this,(function(e){return function(){var t={67740:function(e,t){"use strict";t.G6=t.w1=void 0;t.w1=e=>!!e&&!!e.document&&!!e.document.documentMode;t.G6=e=>{const t=n(e);return t.indexOf("safari")>-1&&t.indexOf("version")>-1};const n=e=>e&&e.navigator&&e.navigator.userAgent?e.navigator.userAgent.toLowerCase():""},5329:function(t){"use strict";t.exports=e},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t"undefined"!=typeof window,d=e=>Object.entries(e).reduce(((e,[t,n])=>(t.includes("data-")&&(e[t]=n),e)),{});const l="mesh-container-content",h="inline-content",m=e=>o().createElement("div",{key:e.props.id+"-rotated-wrapper","data-mesh-id":e.props.id+"-rotated-wrapper"},e),f=(e,t)=>{const{id:r,className:a,wedges:i=[],rotatedComponents:s=[],children:u,fixedComponents:f=[],extraClassName:g="",renderRotatedComponents:p=m}=e,_=o().Children.toArray(u()),E=[],T=[];_.forEach((e=>f.includes(e.props.id)?E.push(e):T.push(e)));const v=(e=>{const{wedges:t,rotatedComponents:n,childrenArray:r,renderRotatedComponents:a}=e,i=n.reduce(((e,t)=>({...e,[t]:!0})),{});return[...r.map((e=>{return i[(t=e,t.props.id.split("__")[0])]?a(e):e;var t})),...t.map((e=>o().createElement("div",{key:e,"data-mesh-id":e})))]})({childrenArray:T,rotatedComponents:s,wedges:i,renderRotatedComponents:p});return o().createElement("div",n()({},d(e),{"data-mesh-id":r+"inlineContent","data-testid":h,className:c(a,g),ref:t}),o().createElement("div",{"data-mesh-id":r+"inlineContent-gridContainer","data-testid":l},v),E)};var g=o().forwardRef(f);const p="wixui-",_=(e,...t)=>{const n=[];return e&&n.push(`${p}${e}`),t.forEach((e=>{e&&(n.push(`${p}${e}`),n.push(e))})),n.join(" ")};var E="jhxvbR";const T="v1",v=2,I=1920,b=1920,w=1e3,L=1e3,y={SCALE_TO_FILL:"fill",SCALE_TO_FIT:"fit",STRETCH:"stretch",ORIGINAL_SIZE:"original_size",TILE:"tile",TILE_HORIZONTAL:"tile_horizontal",TILE_VERTICAL:"tile_vertical",FIT_AND_TILE:"fit_and_tile",LEGACY_STRIP_TILE:"legacy_strip_tile",LEGACY_STRIP_TILE_HORIZONTAL:"legacy_strip_tile_horizontal",LEGACY_STRIP_TILE_VERTICAL:"legacy_strip_tile_vertical",LEGACY_STRIP_SCALE_TO_FILL:"legacy_strip_fill",LEGACY_STRIP_SCALE_TO_FIT:"legacy_strip_fit",LEGACY_STRIP_FIT_AND_TILE:"legacy_strip_fit_and_tile",LEGACY_STRIP_ORIGINAL_SIZE:"legacy_strip_original_size",LEGACY_ORIGINAL_SIZE:"actual_size",LEGACY_FIT_WIDTH:"fitWidth",LEGACY_FIT_HEIGHT:"fitHeight",LEGACY_FULL:"full",LEGACY_BG_FIT_AND_TILE:"legacy_tile",LEGACY_BG_FIT_AND_TILE_HORIZONTAL:"legacy_tile_horizontal",LEGACY_BG_FIT_AND_TILE_VERTICAL:"legacy_tile_vertical",LEGACY_BG_NORMAL:"legacy_normal"},x={FIT:"fit",FILL:"fill",FILL_FOCAL:"fill_focal",CROP:"crop",LEGACY_CROP:"legacy_crop",LEGACY_FILL:"legacy_fill"},A={CENTER:"center",TOP:"top",TOP_LEFT:"top_left",TOP_RIGHT:"top_right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom_left",BOTTOM_RIGHT:"bottom_right",LEFT:"left",RIGHT:"right"},R={[A.CENTER]:{x:.5,y:.5},[A.TOP_LEFT]:{x:0,y:0},[A.TOP_RIGHT]:{x:1,y:0},[A.TOP]:{x:.5,y:0},[A.BOTTOM_LEFT]:{x:0,y:1},[A.BOTTOM_RIGHT]:{x:1,y:1},[A.BOTTOM]:{x:.5,y:1},[A.RIGHT]:{x:1,y:.5},[A.LEFT]:{x:0,y:.5}},C={center:"c",top:"t",top_left:"tl",top_right:"tr",bottom:"b",bottom_left:"bl",bottom_right:"br",left:"l",right:"r"},S={BG:"bg",IMG:"img",SVG:"svg"},M={AUTO:"auto",CLASSIC:"classic",SUPER:"super"},O={classic:1,super:2},P={radius:"0.66",amount:"1.00",threshold:"0.01"},G={uri:"",css:{img:{},container:{}},attr:{img:{},container:{}},transformed:!1},F=25e6,N=[1.5,2,4],k={HIGH:{size:196e4,quality:90,maxUpscale:1},MEDIUM:{size:36e4,quality:85,maxUpscale:1},LOW:{size:16e4,quality:80,maxUpscale:1.2},TINY:{size:0,quality:80,maxUpscale:1.4}},U={HIGH:"HIGH",MEDIUM:"MEDIUM",LOW:"LOW",TINY:"TINY"},B={CONTRAST:"contrast",BRIGHTNESS:"brightness",SATURATION:"saturation",HUE:"hue",BLUR:"blur"},H={JPG:"jpg",JPEG:"jpeg",JPE:"jpe",PNG:"png",WEBP:"webp",WIX_ICO_MP:"wix_ico_mp",WIX_MP:"wix_mp",GIF:"gif",SVG:"svg",AVIF:"avif",UNRECOGNIZED:"unrecognized"},D={AVIF:"AVIF",PAVIF:"PAVIF"};H.JPG,H.JPEG,H.JPE,H.PNG,H.GIF,H.WEBP;function $(e,...t){return function(...n){const r=n[n.length-1]||{},a=[e[0]];return t.forEach((function(t,i){const o=Number.isInteger(t)?n[t]:r[t];a.push(o,e[i+1])})),a.join("")}}function Y(e){return e[e.length-1]}const V=[H.PNG,H.JPEG,H.JPG,H.JPE,H.WIX_ICO_MP,H.WIX_MP,H.WEBP,H.AVIF],j=[H.JPEG,H.JPG,H.JPE];function z(e,t,n){return n&&t&&!(!(r=t.id)||!r.trim()||"none"===r.toLowerCase())&&Object.values(y).includes(e);var r}function W(e,t,n){return function(e,t,n=!1){return!((Z(e)||K(e))&&t&&!n)}(e,t,n)&&(function(e){return V.includes(ne(e))}(e)||function(e,t=!1){return X(e)&&t}(e,n))&&!/(^https?)|(^data)|(^\/\/)/.test(e)}function q(e){return ne(e)===H.PNG}function Z(e){return ne(e)===H.WEBP}function X(e){return ne(e)===H.GIF}function K(e){return ne(e)===H.AVIF}const J=["/","\\","?","<",">","|","\u201c",":",'"'].map(encodeURIComponent),Q=["\\.","\\*"],ee="_";function te(e){return function(e){return j.includes(ne(e))}(e)?H.JPG:q(e)?H.PNG:Z(e)?H.WEBP:X(e)?H.GIF:K(e)?H.AVIF:H.UNRECOGNIZED}function ne(e){return(/[.]([^.]+)$/.exec(e)&&/[.]([^.]+)$/.exec(e)[1]||"").toLowerCase()}function re(e,t,n,r,a){let i;return i=a===x.FILL?function(e,t,n,r){return Math.max(n/e,r/t)}(e,t,n,r):a===x.FIT?function(e,t,n,r){return Math.min(n/e,r/t)}(e,t,n,r):1,i}function ae(e,t,n,r,a,i){e=e||r.width,t=t||r.height;const{scaleFactor:o,width:s,height:c}=function(e,t,n,r,a){let i,o=n,s=r;if(i=re(e,t,n,r,a),a===x.FIT&&(o=e*i,s=t*i),o&&s&&o*s>F){const n=Math.sqrt(F/(o*s));o*=n,s*=n,i=re(e,t,o,s,a)}return{scaleFactor:i,width:o,height:s}}(e,t,r.width*a,r.height*a,n);return function(e,t,n,r,a,i,o){const{optimizedScaleFactor:s,upscaleMethodValue:c,forceUSM:u}=function(e,t,n,r){if("auto"===r)return function(e,t){const n=ce(e,t);return{optimizedScaleFactor:k[n].maxUpscale,upscaleMethodValue:O.classic,forceUSM:!1}}(e,t);if("super"===r)return function(e){return{optimizedScaleFactor:Y(N),upscaleMethodValue:O.super,forceUSM:!(N.includes(e)||e>Y(N))}}(n);return function(e,t){const n=ce(e,t);return{optimizedScaleFactor:k[n].maxUpscale,upscaleMethodValue:O.classic,forceUSM:!1}}(e,t)}(e,t,i,a);let d=n,l=r;if(i<=s)return{width:d,height:l,scaleFactor:i,upscaleMethodValue:c,forceUSM:u,cssUpscaleNeeded:!1};switch(o){case x.FILL:d=n*(s/i),l=r*(s/i);break;case x.FIT:d=e*s,l=t*s}return{width:d,height:l,scaleFactor:s,upscaleMethodValue:c,forceUSM:u,cssUpscaleNeeded:!0}}(e,t,s,c,i,o,n)}function ie(e,t,n,r){const a=se(n)||function(e=A.CENTER){return R[e]}(r);return{x:Math.max(0,Math.min(e.width-t.width,a.x*e.width-t.width/2)),y:Math.max(0,Math.min(e.height-t.height,a.y*e.height-t.height/2)),width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}}function oe(e){return e.alignment&&C[e.alignment]||C[A.CENTER]}function se(e){let t;return!e||"number"!=typeof e.x||isNaN(e.x)||"number"!=typeof e.y||isNaN(e.y)||(t={x:ue(Math.max(0,Math.min(100,e.x))/100,2),y:ue(Math.max(0,Math.min(100,e.y))/100,2)}),t}function ce(e,t){const n=e*t;return n>k[U.HIGH].size?U.HIGH:n>k[U.MEDIUM].size?U.MEDIUM:n>k[U.LOW].size?U.LOW:U.TINY}function ue(e,t){const n=Math.pow(10,t||0);return(e*n/n).toFixed(t)}function de(e){return e&&e.upscaleMethod&&M[e.upscaleMethod.toUpperCase()]||M.AUTO}function le(e,t){const n=Z(e)||K(e);return ne(e)===H.GIF||n&&t}const he={isMobile:!1},me=function(e){return he[e]};function fe(){if("undefined"!=typeof window&&"undefined"!=typeof navigator){const t=window.matchMedia&&window.matchMedia("(max-width: 767px)").matches,n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);e=t&&n,he["isMobile"]=e}var e}function ge(e,t){const n={css:{container:{}}},{css:r}=n,{fittingType:a}=e;switch(a){case y.ORIGINAL_SIZE:case y.LEGACY_ORIGINAL_SIZE:case y.LEGACY_STRIP_ORIGINAL_SIZE:r.container.backgroundSize="auto",r.container.backgroundRepeat="no-repeat";break;case y.SCALE_TO_FIT:case y.LEGACY_STRIP_SCALE_TO_FIT:r.container.backgroundSize="contain",r.container.backgroundRepeat="no-repeat";break;case y.STRETCH:r.container.backgroundSize="100% 100%",r.container.backgroundRepeat="no-repeat";break;case y.SCALE_TO_FILL:case y.LEGACY_STRIP_SCALE_TO_FILL:r.container.backgroundSize="cover",r.container.backgroundRepeat="no-repeat";break;case y.TILE_HORIZONTAL:case y.LEGACY_STRIP_TILE_HORIZONTAL:r.container.backgroundSize="auto",r.container.backgroundRepeat="repeat-x";break;case y.TILE_VERTICAL:case y.LEGACY_STRIP_TILE_VERTICAL:r.container.backgroundSize="auto",r.container.backgroundRepeat="repeat-y";break;case y.TILE:case y.LEGACY_STRIP_TILE:r.container.backgroundSize="auto",r.container.backgroundRepeat="repeat";break;case y.LEGACY_STRIP_FIT_AND_TILE:r.container.backgroundSize="contain",r.container.backgroundRepeat="repeat";break;case y.FIT_AND_TILE:case y.LEGACY_BG_FIT_AND_TILE:r.container.backgroundSize="auto",r.container.backgroundRepeat="repeat";break;case y.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:r.container.backgroundSize="auto",r.container.backgroundRepeat="repeat-x";break;case y.LEGACY_BG_FIT_AND_TILE_VERTICAL:r.container.backgroundSize="auto",r.container.backgroundRepeat="repeat-y";break;case y.LEGACY_BG_NORMAL:r.container.backgroundSize="auto",r.container.backgroundRepeat="no-repeat"}switch(t.alignment){case A.CENTER:r.container.backgroundPosition="center center";break;case A.LEFT:r.container.backgroundPosition="left center";break;case A.RIGHT:r.container.backgroundPosition="right center";break;case A.TOP:r.container.backgroundPosition="center top";break;case A.BOTTOM:r.container.backgroundPosition="center bottom";break;case A.TOP_RIGHT:r.container.backgroundPosition="right top";break;case A.TOP_LEFT:r.container.backgroundPosition="left top";break;case A.BOTTOM_RIGHT:r.container.backgroundPosition="right bottom";break;case A.BOTTOM_LEFT:r.container.backgroundPosition="left bottom"}return n}const pe={[A.CENTER]:"center",[A.TOP]:"top",[A.TOP_LEFT]:"top left",[A.TOP_RIGHT]:"top right",[A.BOTTOM]:"bottom",[A.BOTTOM_LEFT]:"bottom left",[A.BOTTOM_RIGHT]:"bottom right",[A.LEFT]:"left",[A.RIGHT]:"right"},_e={position:"absolute",top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ee(e,t){const n={css:{container:{},img:{}}},{css:r}=n,{fittingType:a}=e,i=t.alignment;switch(r.container.position="relative",a){case y.ORIGINAL_SIZE:case y.LEGACY_ORIGINAL_SIZE:e.parts&&e.parts.length?(r.img.width=e.parts[0].width,r.img.height=e.parts[0].height):(r.img.width=e.src.width,r.img.height=e.src.height);break;case y.SCALE_TO_FIT:case y.LEGACY_FIT_WIDTH:case y.LEGACY_FIT_HEIGHT:case y.LEGACY_FULL:r.img.width=t.width,r.img.height=t.height,r.img.objectFit="contain",r.img.objectPosition=pe[i]||"unset";break;case y.LEGACY_BG_NORMAL:r.img.width="100%",r.img.height="100%",r.img.objectFit="none",r.img.objectPosition=pe[i]||"unset";break;case y.STRETCH:r.img.width=t.width,r.img.height=t.height,r.img.objectFit="fill";break;case y.SCALE_TO_FILL:r.img.width=t.width,r.img.height=t.height,r.img.objectFit="cover"}if("number"==typeof r.img.width&&"number"==typeof r.img.height&&(r.img.width!==t.width||r.img.height!==t.height)){const e=Math.round((t.height-r.img.height)/2),n=Math.round((t.width-r.img.width)/2);Object.assign(r.img,_e,function(e,t,n){return{[A.TOP_LEFT]:{top:0,left:0},[A.TOP_RIGHT]:{top:0,right:0},[A.TOP]:{top:0,left:t},[A.BOTTOM_LEFT]:{bottom:0,left:0},[A.BOTTOM_RIGHT]:{bottom:0,right:0},[A.BOTTOM]:{bottom:0,left:t},[A.RIGHT]:{top:e,right:0},[A.LEFT]:{top:e,left:0},[A.CENTER]:{width:n.width,height:n.height,objectFit:"none"}}}(e,n,t)[i])}return n}function Te(e,t){const n={css:{container:{}},attr:{container:{},img:{}}},{css:r,attr:a}=n,{fittingType:i}=e,o=t.alignment,{width:s,height:c}=e.src;let u;switch(r.container.position="relative",i){case y.ORIGINAL_SIZE:case y.LEGACY_ORIGINAL_SIZE:case y.TILE:e.parts&&e.parts.length?(a.img.width=e.parts[0].width,a.img.height=e.parts[0].height):(a.img.width=s,a.img.height=c),a.img.preserveAspectRatio="xMidYMid slice";break;case y.SCALE_TO_FIT:case y.LEGACY_FIT_WIDTH:case y.LEGACY_FIT_HEIGHT:case y.LEGACY_FULL:a.img.width="100%",a.img.height="100%",a.img.transform="",a.img.preserveAspectRatio="";break;case y.STRETCH:a.img.width=t.width,a.img.height=t.height,a.img.x=0,a.img.y=0,a.img.transform="",a.img.preserveAspectRatio="none";break;case y.SCALE_TO_FILL:W(e.src.id)?(a.img.width=t.width,a.img.height=t.height):(u=function(e,t,n,r,a){const i=re(e,t,n,r,a);return{width:Math.round(e*i),height:Math.round(t*i)}}(s,c,t.width,t.height,x.FILL),a.img.width=u.width,a.img.height=u.height),a.img.x=0,a.img.y=0,a.img.transform="",a.img.preserveAspectRatio="xMidYMid slice"}if("number"==typeof a.img.width&&"number"==typeof a.img.height&&(a.img.width!==t.width||a.img.height!==t.height)){let e,n,r=0,s=0;i===y.TILE?(e=t.width%a.img.width,n=t.height%a.img.height):(e=t.width-a.img.width,n=t.height-a.img.height);const c=Math.round(e/2),u=Math.round(n/2);switch(o){case A.TOP_LEFT:r=0,s=0;break;case A.TOP:r=c,s=0;break;case A.TOP_RIGHT:r=e,s=0;break;case A.LEFT:r=0,s=u;break;case A.CENTER:r=c,s=u;break;case A.RIGHT:r=e,s=u;break;case A.BOTTOM_LEFT:r=0,s=n;break;case A.BOTTOM:r=c,s=n;break;case A.BOTTOM_RIGHT:r=e,s=n}a.img.x=r,a.img.y=s}return a.container.width=t.width,a.container.height=t.height,a.container.viewBox=[0,0,t.width,t.height].join(" "),n}function ve(e,t,n){let r;switch(t.crop&&(r=function(e,t){const n=Math.max(0,Math.min(e.width,t.x+t.width)-Math.max(0,t.x)),r=Math.max(0,Math.min(e.height,t.y+t.height)-Math.max(0,t.y));return n&&r&&(e.width!==n||e.height!==r)?{x:Math.max(0,t.x),y:Math.max(0,t.y),width:n,height:r}:null}(t,t.crop),r&&(e.src.width=r.width,e.src.height=r.height,e.src.isCropped=!0,e.parts.push(be(r)))),e.fittingType){case y.SCALE_TO_FIT:case y.LEGACY_FIT_WIDTH:case y.LEGACY_FIT_HEIGHT:case y.LEGACY_FULL:case y.FIT_AND_TILE:case y.LEGACY_BG_FIT_AND_TILE:case y.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case y.LEGACY_BG_FIT_AND_TILE_VERTICAL:case y.LEGACY_BG_NORMAL:e.parts.push(Ie(e,n));break;case y.SCALE_TO_FILL:e.parts.push(function(e,t){const n=ae(e.src.width,e.src.height,x.FILL,t,e.devicePixelRatio,e.upscaleMethod),r=se(e.focalPoint);return{transformType:r?x.FILL_FOCAL:x.FILL,width:Math.round(n.width),height:Math.round(n.height),alignment:oe(t),focalPointX:r&&r.x,focalPointY:r&&r.y,upscale:n.scaleFactor>1,forceUSM:n.forceUSM,scaleFactor:n.scaleFactor,cssUpscaleNeeded:n.cssUpscaleNeeded,upscaleMethodValue:n.upscaleMethodValue}}(e,n));break;case y.STRETCH:e.parts.push(function(e,t){const n=re(e.src.width,e.src.height,t.width,t.height,x.FILL),r={...t};return r.width=e.src.width*n,r.height=e.src.height*n,Ie(e,r)}(e,n));break;case y.TILE_HORIZONTAL:case y.TILE_VERTICAL:case y.TILE:case y.LEGACY_ORIGINAL_SIZE:case y.ORIGINAL_SIZE:r=ie(e.src,n,e.focalPoint,n.alignment),e.src.isCropped?(Object.assign(e.parts[0],r),e.src.width=r.width,e.src.height=r.height):e.parts.push(be(r));break;case y.LEGACY_STRIP_TILE_HORIZONTAL:case y.LEGACY_STRIP_TILE_VERTICAL:case y.LEGACY_STRIP_TILE:case y.LEGACY_STRIP_ORIGINAL_SIZE:e.parts.push(function(e){return{transformType:x.LEGACY_CROP,width:Math.round(e.width),height:Math.round(e.height),alignment:oe(e),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}(n));break;case y.LEGACY_STRIP_SCALE_TO_FIT:case y.LEGACY_STRIP_FIT_AND_TILE:e.parts.push(function(e){return{transformType:x.FIT,width:Math.round(e.width),height:Math.round(e.height),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(n));break;case y.LEGACY_STRIP_SCALE_TO_FILL:e.parts.push(function(e){return{transformType:x.LEGACY_FILL,width:Math.round(e.width),height:Math.round(e.height),alignment:oe(e),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(n))}}function Ie(e,t){const n=ae(e.src.width,e.src.height,x.FIT,t,e.devicePixelRatio,e.upscaleMethod);return{transformType:!e.src.width||!e.src.height?x.FIT:x.FILL,width:Math.round(n.width),height:Math.round(n.height),alignment:C.center,upscale:n.scaleFactor>1,forceUSM:n.forceUSM,scaleFactor:n.scaleFactor,cssUpscaleNeeded:n.cssUpscaleNeeded,upscaleMethodValue:n.upscaleMethodValue}}function be(e){return{transformType:x.CROP,x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}function we(e,t){t=t||{},e.quality=function(e,t){const n=e.fileType===H.PNG,r=e.fileType===H.JPG,a=e.fileType===H.WEBP,i=e.fileType===H.AVIF,o=r||n||a||i;if(o){const r=Y(e.parts),a=(s=r.width,c=r.height,k[ce(s,c)].quality);let i=t.quality&&t.quality>=5&&t.quality<=90?t.quality:a;return i=n?i+5:i,i}var s,c;return 0}(e,t),e.progressive=function(e){return!1!==e.progressive}(t),e.watermark=function(e){return e.watermark}(t),e.autoEncode=t.autoEncode??!0,e.encoding=t?.encoding,e.unsharpMask=function(e,t){if(function(e){const t="number"==typeof(e=e||{}).radius&&!isNaN(e.radius)&&e.radius>=.1&&e.radius<=500,n="number"==typeof e.amount&&!isNaN(e.amount)&&e.amount>=0&&e.amount<=10,r="number"==typeof e.threshold&&!isNaN(e.threshold)&&e.threshold>=0&&e.threshold<=255;return t&&n&&r}(t.unsharpMask))return{radius:ue(t.unsharpMask?.radius,2),amount:ue(t.unsharpMask?.amount,2),threshold:ue(t.unsharpMask?.threshold,2)};if(("number"!=typeof(n=(n=t.unsharpMask)||{}).radius||isNaN(n.radius)||0!==n.radius||"number"!=typeof n.amount||isNaN(n.amount)||0!==n.amount||"number"!=typeof n.threshold||isNaN(n.threshold)||0!==n.threshold)&&function(e){const t=Y(e.parts);return!(t.scaleFactor>=1)||t.forceUSM||t.transformType===x.FIT}(e))return P;var n;return}(e,t),e.filters=function(e){const t=e.filters||{},n={};Le(t[B.CONTRAST],-100,100)&&(n[B.CONTRAST]=t[B.CONTRAST]);Le(t[B.BRIGHTNESS],-100,100)&&(n[B.BRIGHTNESS]=t[B.BRIGHTNESS]);Le(t[B.SATURATION],-100,100)&&(n[B.SATURATION]=t[B.SATURATION]);Le(t[B.HUE],-180,180)&&(n[B.HUE]=t[B.HUE]);Le(t[B.BLUR],0,100)&&(n[B.BLUR]=t[B.BLUR]);return n}(t)}function Le(e,t,n){return"number"==typeof e&&!isNaN(e)&&0!==e&&e>=t&&e<=n}function ye(e,t,n,r){const a=function(e){return e?.isSEOBot??!1}(r),i=te(t.id),o=function(e,t){const n=/\.([^.]*)$/,r=new RegExp(`(${J.concat(Q).join("|")})`,"g");if(t&&t.length){let e=t;const a=t.match(n);return a&&V.includes(a[1])&&(e=t.replace(n,"")),encodeURIComponent(e).replace(r,ee)}const a=e.match(/\/(.*?)$/);return(a?a[1]:e).replace(n,"")}(t.id,t.name),s=a?1:function(e){return Math.min(e.pixelAspectRatio||1,v)}(n),c=ne(t.id),u=c,d=W(t.id,r?.hasAnimation,r?.allowAnimatedTransform),l={fileName:o,fileExtension:c,fileType:i,fittingType:e,preferredExtension:u,src:{id:t.id,width:t.width,height:t.height,isCropped:!1,isAnimated:le(t.id,r?.hasAnimation)},focalPoint:{x:t.focalPoint&&t.focalPoint.x,y:t.focalPoint&&t.focalPoint.y},parts:[],devicePixelRatio:s,quality:0,upscaleMethod:de(r),progressive:!0,watermark:"",unsharpMask:{},filters:{},transformed:d};return d&&(ve(l,t,n),we(l,r)),l}function xe(e,t,n){const r={...n},a=me("isMobile");switch(e){case y.LEGACY_BG_FIT_AND_TILE:case y.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case y.LEGACY_BG_FIT_AND_TILE_VERTICAL:case y.LEGACY_BG_NORMAL:const e=a?w:I,n=a?L:b;r.width=Math.min(e,t.width),r.height=Math.min(n,Math.round(r.width/(t.width/t.height))),r.pixelAspectRatio=1}return r}const Ae=$`fit/w_${"width"},h_${"height"}`,Re=$`fill/w_${"width"},h_${"height"},al_${"alignment"}`,Ce=$`fill/w_${"width"},h_${"height"},fp_${"focalPointX"}_${"focalPointY"}`,Se=$`crop/x_${"x"},y_${"y"},w_${"width"},h_${"height"}`,Me=$`crop/w_${"width"},h_${"height"},al_${"alignment"}`,Oe=$`fill/w_${"width"},h_${"height"},al_${"alignment"}`,Pe=$`,lg_${"upscaleMethodValue"}`,Ge=$`,q_${"quality"}`,Fe=$`,quality_auto`,Ne=$`,usm_${"radius"}_${"amount"}_${"threshold"}`,ke=$`,bl`,Ue=$`,wm_${"watermark"}`,Be={[B.CONTRAST]:$`,con_${"contrast"}`,[B.BRIGHTNESS]:$`,br_${"brightness"}`,[B.SATURATION]:$`,sat_${"saturation"}`,[B.HUE]:$`,hue_${"hue"}`,[B.BLUR]:$`,blur_${"blur"}`},He=$`,enc_auto`,De=$`,enc_avif`,$e=$`,enc_pavif`,Ye=$`,pstr`;function Ve(e,t,n,r={},a){if(W(t.id,r?.hasAnimation,r?.allowAnimatedTransform)){if(Z(t.id)||K(t.id)){const{alignment:i,...o}=n;t.focalPoint={x:void 0,y:void 0},delete t?.crop,a=ye(e,t,o,r)}else a=a||ye(e,t,n,r);return function(e){const t=[];e.parts.forEach((e=>{switch(e.transformType){case x.CROP:t.push(Se(e));break;case x.LEGACY_CROP:t.push(Me(e));break;case x.LEGACY_FILL:let n=Oe(e);e.upscale&&(n+=Pe(e)),t.push(n);break;case x.FIT:let r=Ae(e);e.upscale&&(r+=Pe(e)),t.push(r);break;case x.FILL:let a=Re(e);e.upscale&&(a+=Pe(e)),t.push(a);break;case x.FILL_FOCAL:let i=Ce(e);e.upscale&&(i+=Pe(e)),t.push(i)}}));let n=t.join("/");return e.quality&&(n+=Ge(e)),e.unsharpMask&&(n+=Ne(e.unsharpMask)),e.progressive||(n+=ke(e)),e.watermark&&(n+=Ue(e)),e.filters&&(n+=Object.keys(e.filters).map((t=>Be[t](e.filters))).join("")),e.fileType!==H.GIF&&(e.encoding===D.AVIF?(n+=De(e),n+=Fe(e)):e.encoding===D.PAVIF?(n+=$e(e),n+=Fe(e)):e.autoEncode&&(n+=He(e))),e.src?.isAnimated&&e.transformed&&(n+=Ye(e)),`${e.src.id}/${T}/${n}/${e.fileName}.${e.preferredExtension}`}(a)}return t.id}const je={[A.CENTER]:"50% 50%",[A.TOP_LEFT]:"0% 0%",[A.TOP_RIGHT]:"100% 0%",[A.TOP]:"50% 0%",[A.BOTTOM_LEFT]:"0% 100%",[A.BOTTOM_RIGHT]:"100% 100%",[A.BOTTOM]:"50% 100%",[A.RIGHT]:"100% 50%",[A.LEFT]:"0% 50%"},ze=Object.entries(je).reduce(((e,[t,n])=>(e[n]=t,e)),{}),We=[y.TILE,y.TILE_HORIZONTAL,y.TILE_VERTICAL,y.LEGACY_BG_FIT_AND_TILE,y.LEGACY_BG_FIT_AND_TILE_HORIZONTAL,y.LEGACY_BG_FIT_AND_TILE_VERTICAL],qe=[y.LEGACY_ORIGINAL_SIZE,y.ORIGINAL_SIZE,y.LEGACY_BG_NORMAL];function Ze(e,t,{width:n,height:r}){return e===y.TILE&&t.width>n&&t.height>r}function Xe(e,{width:t,height:n}){if(!t||!n){const r=t||Math.min(980,e.width),a=r/e.width;return{width:r,height:n||e.height*a}}return{width:t,height:n}}function Ke(e,t,n,r="center"){const a={img:{},container:{}};if(e===y.SCALE_TO_FILL){const e=t.focalPoint&&function(e){const t=`${e.x}% ${e.y}%`;return ze[t]||""}(t.focalPoint),i=e||r;t.focalPoint&&!e?a.img={objectPosition:Je(t,n,t.focalPoint)}:a.img={objectPosition:je[i]}}else[y.LEGACY_ORIGINAL_SIZE,y.ORIGINAL_SIZE].includes(e)?a.img={objectFit:"none",top:"auto",left:"auto",right:"auto",bottom:"auto"}:We.includes(e)&&(a.container={backgroundSize:`${t.width}px ${t.height}px`});return a}function Je(e,t,n){const{width:r,height:a}=e,{width:i,height:o}=t,{x:s,y:c}=n;if(!i||!o)return`${s}% ${c}%`;const u=Math.max(i/r,o/a),d=r*u,l=a*u,h=Math.max(0,Math.min(d-i,d*(s/100)-i/2)),m=Math.max(0,Math.min(l-o,l*(c/100)-o/2));return`${h&&Math.floor(h/(d-i)*100)}% ${m&&Math.floor(m/(l-o)*100)}%`}const Qe={width:"100%",height:"100%"};function et(e,t,n,r={}){const{autoEncode:a=!0,isSEOBot:i,shouldLoadHQImage:o,hasAnimation:s,allowAnimatedTransform:c,encoding:u}=r;if(!z(e,t,n))return G;const d=void 0===c||c,l=W(t.id,s,d);if(!l||o)return tt(e,t,n,{...r,autoEncode:a,useSrcset:l});const h={...n,...Xe(t,n)},{alignment:m,htmlTag:f}=h,g=Ze(e,t,h),p=function(e,t,{width:n,height:r},a=!1){if(a)return{width:n,height:r};const i=!qe.includes(e),o=Ze(e,t,{width:n,height:r}),s=!o&&We.includes(e),c=s?t.width:n,u=s?t.height:r,d=i?function(e,t){return e>900?t?.05:.15:e>500?t?.1:.18:e>200?.25:1}(c,q(t.id)):1;return{width:o?1920:c*d,height:u*d}}(e,t,h,i),_=function(e,t,n){return n?0:We.includes(t)?1:e>200?2:3}(h.width,e,i),E=function(e,t){const n=We.includes(e)&&!t;return e===y.SCALE_TO_FILL||n?y.SCALE_TO_FIT:e}(e,g),T=Ke(e,t,n,m),{uri:v}=tt(E,t,{...p,alignment:m,htmlTag:f},{autoEncode:a,filters:_?{blur:_}:{},hasAnimation:s,allowAnimatedTransform:d,encoding:u}),{attr:I={},css:b}=tt(e,t,{...h,alignment:m,htmlTag:f},{});return b.img=b.img||{},b.container=b.container||{},Object.assign(b.img,T.img,Qe),Object.assign(b.container,T.container),{uri:v,css:b,attr:I,transformed:!0}}function tt(e,t,n,r){let a={};if(z(e,t,n)){const i=xe(e,t,n),o=ye(e,t,i,r);a.uri=Ve(e,t,i,r,o),r?.useSrcset&&(a.srcset=function(e,t,n,r,a){const i=n.pixelAspectRatio||1;return{dpr:[`${1===i?a.uri:Ve(e,t,{...n,pixelAspectRatio:1},r)} 1x`,`${2===i?a.uri:Ve(e,t,{...n,pixelAspectRatio:2},r)} 2x`]}}(e,t,i,r,a)),Object.assign(a,function(e,t){let n;return n=t.htmlTag===S.BG?ge:t.htmlTag===S.SVG?Te:Ee,n(e,t)}(o,i),{transformed:o.transformed})}else a=G;return a}const nt="https://static.wixstatic.com/media/";"undefined"!=typeof window&&window.devicePixelRatio;fe();fe();const rt=nt,{STATIC_MEDIA_URL:at}=e,it=({fittingType:e,src:t,target:n,options:r})=>{const a=et(e,t,n,{...r,autoEncode:!0});return a?.uri&&!/^[a-z]+:/.test(a.uri)&&(a.uri=`${at}${a.uri}`),a},ot=/^[a-z]+:/,st=e=>{const{id:t,containerId:n,uri:r,alt:a,name:o="",role:s,width:c,height:u,displayMode:d,devicePixelRatio:l,quality:h,alignType:m,bgEffectName:f="",focalPoint:g,upscaleMethod:p,className:_="",crop:T,imageStyles:v={},targetWidth:I,targetHeight:b,targetScale:w,onLoad:L=()=>{},onError:y=()=>{},shouldUseLQIP:x,containerWidth:A,containerHeight:R,getPlaceholder:C,isInFirstFold:S,placeholderTransition:M,socialAttrs:O,isSEOBot:P,skipMeasure:G,hasAnimation:F,encoding:N}=e,k=i.useRef(null);let U="";const B="blur"===M,H=i.useRef(null);if(!H.current)if(C||x||S||P){const e={upscaleMethod:p,...h||{},shouldLoadHQImage:S,isSEOBot:P,hasAnimation:F,encoding:N};H.current=(C||it)({fittingType:d,src:{id:r,width:c,height:u,crop:T,name:o,focalPoint:g},target:{width:A,height:R,alignment:m,htmlTag:"img"},options:e}),U=!H.current.transformed||S||P?"":"true"}else H.current={uri:void 0,css:{img:{}},attr:{img:{},container:{}},transformed:!1};const D=!P&&(C||x)&&!S&&H.current.transformed,$=i.useMemo((()=>JSON.stringify({containerId:n,...n&&{containerId:n},...m&&{alignType:m},...G&&{skipMeasure:!0},displayMode:d,...A&&{targetWidth:A},...R&&{targetHeight:R},...I&&{targetWidth:I},...b&&{targetHeight:b},...w&&{targetScale:w},isLQIP:D,isSEOBot:P,lqipTransition:M,encoding:N,imageData:{width:c,height:u,uri:r,name:o,displayMode:d,hasAnimation:F,...h&&{quality:h},...l&&{devicePixelRatio:l},...g&&{focalPoint:g},...T&&{crop:T},...p&&{upscaleMethod:p}}})),[n,m,G,d,A,R,I,b,w,D,P,M,N,c,u,r,o,F,h,l,g,T,p]),Y=H.current,V=Y?.uri,j=Y?.srcset,z=Y.css?.img,W=`${E} ${_}`;i.useEffect((()=>{const e=k.current;L&&e?.currentSrc&&e?.complete&&L({target:e})}),[]);const q=Y&&!Y?.transformed?`max(${c}px, 100%)`:I?`${I}px`:null;return i.createElement("wow-image",{id:t,class:W,"data-image-info":$,"data-motion-part":`BG_IMG ${n}`,"data-bg-effect-name":f,"data-has-ssr-src":U,"data-animate-blur":!P&&D&&B?"":void 0,style:q?{"--wix-img-max-width":q}:{}},i.createElement("img",{src:V,ref:k,alt:a||"",role:s,style:{...z,...v},onLoad:L,onError:y,width:A||void 0,height:R||void 0,...O,srcSet:S?j?.dpr?.map((e=>ot.test(e)?e:`${at}${e}`)).join(", "):void 0,fetchpriority:S?"high":void 0,loading:!1===S?"lazy":void 0,suppressHydrationWarning:!0}))};var ct="Tj01hh";var ut=e=>{var t,r;const{id:a,alt:o,role:s,className:u,imageStyles:d={},targetWidth:l,targetHeight:h,onLoad:m,onError:f,containerWidth:g,containerHeight:p,isInFirstFold:_,socialAttrs:E,skipMeasure:T,responsiveImageProps:v,zoomedImageResponsiveOverride:I,displayMode:b}=e,w=l||g,L=h||p,{fallbackSrc:y,srcset:x,sources:A,css:R}=v||{},{width:C,height:S,...M}=(null==v||null==(t=v.css)?void 0:t.img)||{},O="original_size"===b?null==v||null==(r=v.css)?void 0:r.img:M;var P;return y&&x&&R?i.createElement("img",n()({fetchpriority:_?"high":void 0,loading:!1===_?"lazy":void 0,sizes:w+"px",srcSet:T?null==I?void 0:I.srcset:null==v?void 0:v.srcset,id:a,src:y,alt:o||"",role:s,style:{...d,...T?{...null==I||null==(P=I.css)?void 0:P.img}:{...O}},onLoad:m,onError:f,className:c(u,ct),width:w,height:L},E)):y&&A&&R?i.createElement("picture",null,A.map((e=>{let{srcset:t,media:n,sizes:r}=e;return i.createElement("source",{key:n,srcSet:t,media:n,sizes:r})})),i.createElement("img",n()({fetchpriority:_?"high":void 0,loading:!1===_?"lazy":void 0,id:a,src:A[0].fallbackSrc,alt:o||"",role:s,style:{...d,objectFit:A[0].imgStyle.objectFit,objectPosition:A[0].imgStyle.objectPosition},onLoad:m,onError:f,className:c(u,ct),width:w,height:L},E))):i.createElement(st,e)};var dt=e=>{var t,n,r;const{className:a,customIdPrefix:o,getPlaceholder:s,hasAnimation:c,...u}=e,d=i.useMemo((()=>JSON.stringify({containerId:u.containerId,alignType:u.alignType,fittingType:u.displayMode,hasAnimation:c,imageData:{width:u.width,height:u.height,uri:u.uri,name:u.name,...u.quality&&{quality:u.quality},displayMode:u.displayMode}})),[u,c]),l=i.useRef(null);l.current||(l.current=s?s({fittingType:u.displayMode,src:{id:u.uri,width:u.width,height:u.height,name:u.name},target:{width:u.containerWidth,height:u.containerHeight,alignment:u.alignType,htmlTag:"bg"},options:{hasAnimation:c,allowAnimatedTransform:!1}}):{uri:void 0,css:{img:{}},attr:{img:{},container:{}}});const h=l.current,m=null!=(t=null==h?void 0:h.uri)?t:"",f=null!=(n=null==(r=h.css)?void 0:r.container)?n:{},g=Object.assign(m?{backgroundImage:"url("+m+")"}:{},f);return i.createElement("wix-bg-image",{id:""+(o||"bgImg_")+u.containerId,class:a,style:g,"data-tiled-image-info":d,"data-has-bg-scroll-effect":u.hasBgScrollEffect||"","data-bg-effect-name":u.bgEffectName||"","data-motion-part":"BG_IMG "+u.containerId})};const lt=new RegExp("<%= compId %>","g"),ht=(e,t)=>e.replace(lt,t);var mt=e=>null==e?void 0:e.replace(":hover",""),ft="bX9O_S",gt="Z_wCwr",pt="Jxk_UL",_t="K8MSra",Et="YTb3b4";const Tt={quality:{unsharpMask:{radius:.33,amount:1,threshold:0}},devicePixelRatio:1};var vt=e=>{const{id:t,videoRef:r,videoInfo:a,posterImageInfo:o,muted:s,preload:u,loop:d,alt:l,isVideoEnabled:h,getPlaceholder:m,extraClassName:f=""}=e;a.containerId=mt(a.containerId);const g=i.useMemo((()=>JSON.stringify(a)),[a]),p=i.createElement(i.Fragment,null,o.filterEffectSvgString&&i.createElement("svg",{id:"svg_"+a.containerId,className:Et},i.createElement("defs",{dangerouslySetInnerHTML:{__html:ht(o.filterEffectSvgString,a.containerId)}})),i.createElement(ut,n()({key:a.videoId+"_img",id:o.containerId+"_img",className:c(gt,pt,"bgVideoposter",f),imageStyles:{width:"100%",height:"100%"}},o,Tt,{getPlaceholder:m})));return h?i.createElement("wix-video",{id:t,"data-video-info":g,"data-motion-part":"BG_IMG "+a.containerId,class:c(ft,"bgVideo",f)},i.createElement("video",{key:a.videoId+"_video",ref:r,id:a.containerId+"_video",className:_t,crossOrigin:"anonymous","aria-label":l,playsInline:!0,preload:u,muted:s,loop:d}),p):p},It="SUz0WK";var bt=e=>{const{id:t,containerId:n,pageId:r,children:a,bgEffectName:o="",containerSize:s}=e;return i.createElement("wix-bg-media",{id:t,class:It,"data-container-id":n,"data-container-size":((null==s?void 0:s.width)||0)+", "+((null==s?void 0:s.height)||0),"data-page-id":r,"data-bg-effect-name":o,"data-motion-part":"BG_MEDIA "+n},a)};const wt="bgOverlay";var Lt="m4khSP",yt="FNxOn5";var xt=e=>{const{imageOverlay:t}=e;return i.createElement("div",{"data-testid":wt,className:Lt},t&&i.createElement(dt,n()({customIdPrefix:"bgImgOverlay_",className:yt},t)))};const At="bgLayers",Rt="colorUnderlay",Ct="mediaPadding",St="canvas";var Mt="MW5IWV",Ot="N3eg0s",Pt="Kv1aVt",Gt="dLPlxY",Ft="VgO9Yg",Nt="LWbAav",kt="yK6aSC",Ut="K_YxMd",Bt="NGjcJN",Ht="mNGsUM",Dt="I8xA4L";const $t="bgImage";var Yt=e=>{const{videoRef:t,canvasRef:r,hasBgFullscreenScrollEffect:a,image:o,backgroundImage:s,backgroundMedia:u,video:d,backgroundOverlay:l,shouldPadMedia:h,extraClass:m="",shouldRenderUnderlay:f=!d,reducedMotion:g=!1,getPlaceholder:p,hasCanvasAnimation:_,useWixMediaCanvas:E,onClick:T}=e,{onImageLoad:v}=(e=>{let{onReady:t,image:n}=e;return(0,i.useEffect)((()=>{t&&!n&&t()}),[t,n]),{onImageLoad:e=>{null!=n&&n.onLoad&&n.onLoad(e),t&&t()}}})(e),I=mt(e.containerId),b="img_"+mt(I),w=o&&i.createElement(ut,n()({id:b,className:c(Pt,Gt,Ht,$t),imageStyles:{width:"100%",height:"100%"},getPlaceholder:p},o,{onLoad:v})),L=s&&i.createElement(dt,n()({},s,{containerId:I,className:c(Pt,Gt,Ht,$t),getPlaceholder:p})),y=d&&i.createElement(vt,n()({id:"videoContainer_"+I},d,{extraClassName:kt,reducedMotion:g,videoRef:t,getPlaceholder:p})),x=E&&r||_?i.createElement("wix-media-canvas",{"data-container-id":I,class:_?Dt:""},w,L,y,i.createElement("canvas",{id:I+"webglcanvas",className:c(Ut,"webglcanvas"),"aria-label":(null==d?void 0:d.alt)||"",role:"presentation","data-testid":St})):i.createElement(i.Fragment,null,w,L,y,r&&i.createElement("canvas",{id:I+"webglcanvas",ref:r,className:c(Ut,"webglcanvas"),"aria-label":(null==d?void 0:d.alt)||"",role:"presentation","data-testid":St})),A=u?i.createElement(bt,n()({id:"bgMedia_"+I},u),x):i.createElement("div",{id:"bgMedia_"+I,"data-motion-part":"BG_MEDIA "+I,className:Ft},x),R=l&&i.createElement(xt,l);return i.createElement("div",{id:At+"_"+I,"data-hook":At,"data-motion-part":"BG_LAYER "+I,className:c(Mt,m,{[Ot]:a}),onClick:T},f&&i.createElement("div",{"data-testid":Rt,className:c(Nt,Pt)}),h?i.createElement("div",{"data-testid":Ct,className:Bt},A,R):i.createElement(i.Fragment,null,A,R))};const Vt=u()?i.useLayoutEffect:i.useEffect;var jt={root:"video-box"},zt="M7AL1H",Wt="K0b3At",qt="bno0bO",Zt="TFzbYK";const Xt=13,Kt=27,Jt=["Spacebar"," "],Qt=["Enter"];function en(e){return t=>{t.keyCode===e&&(t.preventDefault(),t.stopPropagation(),t.currentTarget.click())}}en(32),en(Xt),en(Kt);var tn={init:function({gl:e,plane:t,effects:n,dimensions:r,noSource:a}){const i=function(e,t,n,r=!1){const a=r?null:{texture:mn(e).texture,buffer:null};a&&(e.bindTexture(e.TEXTURE_2D,a.texture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0));const i=function(e,t,n=!1){return t.reduce(((e,t)=>{const{attributes:n=[],uniforms:r=[],textures:a=[],varying:i={}}=t,o=n=>Object.keys(t[n]||{}).forEach((r=>{"constant"===r||"main"===r||"source"===r?e[n][r]+=t[n][r]+"\n":e[n][r]={...e[n][r],...t[n][r]}}));return o("vertex"),o("fragment"),n.forEach((t=>{e.attributes.some((e=>{if(e.name===t.name)return Object.assign(e,t),!0}))||e.attributes.push(t)})),e.attributes.forEach((t=>{if(t.extends){if(!e.attributes.some((e=>{if(e.name===t.extends)return Object.assign(t,e,{name:t.name}),!0})))throw new Error(`Could not find attribute ${t.extends} to extend`)}})),e.uniforms.push(...r),e.textures.push(...a),Object.assign(e.vertex.varying,i),Object.assign(e.fragment.varying,i),e}),function(e,t){const n=t?[]:[{name:"u_source",type:"i",data:[0]}],r=[{name:"a_position",data:new Float32Array(dn({xEnd:2,yEnd:2,factor:1},e)),size:2,type:"FLOAT"}];t||r.push({name:"a_texCoord",data:new Float32Array(dn({xEnd:1,yEnd:1,factor:0},e)),size:2,type:"FLOAT"});return{vertex:{uniform:{},attribute:{},varying:{},constant:"",main:""},fragment:{uniform:{},varying:{},constant:"",main:"",source:""},attributes:r,uniforms:n,textures:[]}}(e,n))}(t,n,r),o=ln(i.vertex,r?nn:rn),s=ln(i.fragment,r?an:on),{program:c,vertexShader:u,fragmentShader:d,error:l,type:h}=function(e,t,n){const r=hn(e,e.VERTEX_SHADER,t),a=hn(e,e.FRAGMENT_SHADER,n);if(r.error)return r;if(a.error)return a;return function(e,t,n){const r=e.createProgram();e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r);const a=e.getProgramParameter(r,e.LINK_STATUS);if(a)return{program:r,vertexShader:t,fragmentShader:n};const i={error:e.getProgramInfoLog(r),type:"program"};return e.deleteProgram(r),i}(e,r,a)}(e,o,s);if(l)throw new Error(`${h} error:: ${l}\n${h===cn.fragment?s:o}`);let m,f;try{m=e.getExtension("OES_vertex_array_object"),f=m.createVertexArrayOES(),m.bindVertexArrayOES(f)}catch(e){}const g=function(e,t,n){return(n||[]).map((n=>{const{location:r,buffer:a}=function(e,t,n,r){const a=e.getAttribLocation(t,n),i=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,i),e.bufferData(e.ARRAY_BUFFER,r,e.STATIC_DRAW),{location:a,buffer:i}}(e,t,n.name,n.data);return{name:n.name,location:r,buffer:a,type:n.type,size:n.size}}))}(e,c,i.attributes);f&&(fn(e,g),m.bindVertexArrayOES(null));const p=function(e,t,n){return(n||[]).map((n=>({location:e.getUniformLocation(t,n.name),size:n.size||n.data.length,type:n.type,data:n.data})))}(e,c,i.uniforms);return{extensions:{vao:m},program:c,vertexShader:u,fragmentShader:d,source:a,attributes:g,uniforms:p,textures:i.textures,vao:f}}(e,t,n,a);return{gl:e,data:i,dimensions:r||{}}},draw:function(e,t={},n,r,a){const{program:i,source:o,attributes:s,uniforms:c,textures:u,extensions:d,vao:l}=r,{xSegments:h=1,ySegments:m=1}=t;n&&o&&o.texture&&(e.bindTexture(e.TEXTURE_2D,o.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n));e.useProgram(i),l?d.vao.bindVertexArrayOES(l):fn(e,s);!function(e,t){(t||[]).forEach((t=>{let{size:n,type:r,location:a,data:i}=t;"i"===r&&(i=new Int32Array(i)),e[`uniform${n}${r}v`](a,i)}))}(e,c);let f=e.TEXTURE0;o&&(e.activeTexture(f),e.bindTexture(e.TEXTURE_2D,o.texture),f=e.TEXTURE1);if(u)for(let t=0;te.deleteBuffer(t.buffer))),c&&s.vao.deleteVertexArrayOES(c);i&&i.texture&&e.deleteTexture(i.texture);e.deleteProgram(n),e.deleteShader(r),e.deleteShader(a)},resize:function(e,t){const n=e.canvas,{width:r,height:a}=t||{};let i,o;r&&a?(i=r,o=a):(i=Math.floor(1*n.clientWidth),o=Math.floor(1*n.clientHeight));n.width===i&&n.height===o||(n.width=i,n.height=o);e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight)},getWebGLContext:function(e){let t;const n={preserveDrawingBuffer:!1,antialias:!1,depth:!1,stencil:!1};if(t=e.getContext("webgl",n),t)un=!0;else{if(un)return null;t=e.getContext("experimental-webgl",n)}return t},createTexture:mn};const nn=({uniform:e="",attribute:t="",varying:n="",constant:r="",main:a=""})=>`\nprecision highp float;\n${e}\n${t}\nattribute vec2 a_position;\n${n}\n\nconst vec3 lumcoeff = vec3(0.2125, 0.7154, 0.0721);\n${r}\nvoid main() {\n ${a}\n gl_Position = vec4(a_position.xy, 0.0, 1.0);\n}`,rn=({uniform:e="",attribute:t="",varying:n="",constant:r="",main:a=""})=>`\nprecision highp float;\n${e}\n${t}\nattribute vec2 a_texCoord;\nattribute vec2 a_position;\n${n}\nvarying vec2 v_texCoord;\n\nconst vec3 lumcoeff = vec3(0.2125, 0.7154, 0.0721);\n${r}\nvoid main() {\n v_texCoord = a_texCoord;\n ${a}\n gl_Position = vec4(a_position.xy, 0.0, 1.0);\n}`,an=({uniform:e="",varying:t="",constant:n="",main:r="",source:a=""})=>`\nprecision highp float;\n${t}\n${e}\n\nconst vec3 lumcoeff = vec3(0.2125, 0.7154, 0.0721);\n${n}\nvoid main() {\n ${a}\n vec3 color = vec3(0.0);\n float alpha = 1.0;\n ${r}\n gl_FragColor = vec4(color, 1.0) * alpha;\n}`,on=({uniform:e="",varying:t="",constant:n="",main:r="",source:a=""})=>`\nprecision highp float;\n${t}\nvarying vec2 v_texCoord;\n${e}\nuniform sampler2D u_source;\n\nconst vec3 lumcoeff = vec3(0.2125, 0.7154, 0.0721);\n${n}\nvoid main() {\n vec2 sourceCoord = v_texCoord;\n ${a}\n vec4 pixel = texture2D(u_source, sourceCoord);\n vec3 color = pixel.rgb;\n float alpha = pixel.a;\n ${r}\n gl_FragColor = vec4(color, 1.0) * alpha;\n}`,sn={stretch:"CLAMP_TO_EDGE",repeat:"REPEAT",mirror:"MIRRORED_REPEAT"},cn={vertex:"VERTEX",fragment:"FRAGMENT"};let un=!1;function dn({xEnd:e,yEnd:t,factor:n},r={}){const{xSegments:a=1,ySegments:i=1}=r,o=[];for(let r=0;r(["uniform","attribute","varying"].includes(t)?e[t]=Object.entries(n).reduce(((e,[n,r])=>e+`${t} ${r} ${n};\n`),""):e[t]=n,e)),{}))}function hn(e,t,n){const r=e.createShader(t);e.shaderSource(r,n),e.compileShader(r);if(e.getShaderParameter(r,e.COMPILE_STATUS))return r;const a={error:e.getShaderInfoLog(r),type:t===e.VERTEX_SHADER?cn.vertex:cn.fragment};return e.deleteShader(r),a}function mn(e,{width:t=1,height:n=1,data:r=null,format:a="RGBA",wrap:i="stretch"}={}){const o=e.createTexture();return e.bindTexture(e.TEXTURE_2D,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e[gn(i.x||i)]),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e[gn(i.y||i)]),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),r?e.texImage2D(e.TEXTURE_2D,0,e[a],e[a],e.UNSIGNED_BYTE,r):e.texImage2D(e.TEXTURE_2D,0,e[a],t,n,0,e[a],e.UNSIGNED_BYTE,null),{texture:o,width:t,height:n,format:a}}function fn(e,t){(t||[]).forEach((t=>{const{location:n,buffer:r,size:a,type:i}=t;e.enableVertexAttribArray(n),e.bindBuffer(e.ARRAY_BUFFER,r),e.vertexAttribPointer(n,a,e[i],!1,0,0)}))}function gn(e){return sn[e]||sn.stretch}class pn{constructor(e){if(!e||!e.target)throw new Error("A target canvas was not provided");if(pn.preventContextCreation)throw new Error("Context creation is prevented");this._contextCreationError=function(){pn.preventContextCreation=!0,e&&e.onContextCreationError&&e.onContextCreationError.call(this,e)},e.target.addEventListener("webglcontextcreationerror",this._contextCreationError,!1);if(!this.init(e))throw new Error("Could not create context");this._restoreContext=t=>{t&&t.preventDefault(),this.config.target.removeEventListener("webglcontextrestored",this._restoreContext,!0);return!!this.init()&&(this._source&&this.setSource(this._source),delete this._source,e&&e.onContextRestored&&e.onContextRestored.call(this,e),!0)},this._loseContext=t=>{t.preventDefault(),this.gl&&this.gl.isContextLost()&&(this.lostContext=!0,this.config.target.addEventListener("webglcontextrestored",this._restoreContext,!0),this.destroy(!0),e&&e.onContextLost&&e.onContextLost.call(this,e))},this.config.target.addEventListener("webglcontextlost",this._loseContext,!0)}init(e){e=e||this.config;let{target:t,plane:n,effects:r,ticker:a,noSource:i}=e;if(pn.preventContextCreation)return!1;this.lostContext=!1;let o=tn.getWebGLContext(t);if(!o)return!1;if(o.isContextLost()){if(!this.restoreContext())return!1;if(o=tn.getWebGLContext(this.config.target),!o)return!1}const{x:s=1,y:c=1}=n&&n.segments?"object"==typeof n.segments?n.segments:{x:n.segments,y:n.segments}:{};this.plane={xSegments:s,ySegments:c};const{data:u}=tn.init({gl:o,plane:this.plane,effects:r,dimensions:this.dimensions,noSource:i});return this.gl=o,this.data=u,this.config=e,a&&(this.ticker=a,a.add(this)),!0}setSource(e){if(!e)return;if(this.lostContext){if(!this.restoreContext())return}let t,n,r;"[object Object]"===Object.prototype.toString.call(e)?({media:t,width:n,height:r}=e):t=e,n&&r&&(this.dimensions={width:n,height:r}),tn.resize(this.gl,this.dimensions),this._createTextures(),this.media=t}draw(e){if(this.lostContext){if(!this.restoreContext())return}const t=this.config.beforeDraw;t&&!1===t(e)||tn.draw(this.gl,this.plane,this.media,this.data,this.dimensions)}play(e){if(this.config.beforeDraw=e,this.ticker)this.animationFrameId&&this.stop(),this.playing||(this.playing=!0,this.ticker.add(this));else if(!this.animationFrameId){const e=t=>{this.animationFrameId=window.requestAnimationFrame(e),this.draw(t)};this.animationFrameId=window.requestAnimationFrame(e)}}stop(){this.animationFrameId&&(window.cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.playing&&(this.playing=!1,this.ticker.remove(this))}destroy(e){if(this.stop(),this.gl&&this.data&&tn.destroy(this.gl,this.data),e){const e=this.dimensions||{};this._source=this._source||{media:this.media,width:e.width,height:e.height}}else this.config&&(this.config.target.removeEventListener("webglcontextlost",this._loseContext,!0),this.config.target.removeEventListener("webglcontextcreationerror",this._contextCreationError,!1)),this.config=null,this.dimensions=null;this.gl=null,this.data=null,this.media=null}restoreContext(){if(pn.preventContextCreation)return!1;const e=this.config.target,t=this.config.target.cloneNode(!0),n=e.parentNode;return n&&n.replaceChild(t,e),this.config.target=t,e.removeEventListener("webglcontextlost",this._loseContext,!0),e.removeEventListener("webglcontextrestored",this._restoreContext,!0),e.removeEventListener("webglcontextcreationerror",this._contextCreationError,!1),t.addEventListener("webglcontextlost",this._loseContext,!0),t.addEventListener("webglcontextcreationerror",this._contextCreationError,!1),!this.lostContext||this._restoreContext()}_createTextures(){this.data&&this.data.textures.forEach(((e,t)=>{const n=this.data.textures[t];n.texture=tn.createTexture(this.gl,{width:this.dimensions.width,height:this.dimensions.height,format:e.format,data:e.data,wrap:e.wrap}).texture,n.format=e.format,n.update=e.update}))}}var _n={effects:{brightnessContrast:function({brightness:e=1,contrast:t=1}={}){return{fragment:{uniform:{u_brEnabled:"bool",u_ctEnabled:"bool",u_contrast:"float",u_brightness:"float"},constant:"const vec3 half3 = vec3(0.5);",main:"\n if (u_brEnabled) {\n color *= u_brightness;\n }\n\n if (u_ctEnabled) {\n color = (color - half3) * u_contrast + half3;\n }\n\n color = clamp(color, 0.0, 1.0);"},get brightness(){return this.uniforms[2].data[0]},set brightness(e){this.uniforms[2].data[0]=parseFloat(Math.max(0,e))},get contrast(){return this.uniforms[3].data[0]},set contrast(e){this.uniforms[3].data[0]=parseFloat(Math.max(0,e))},get brightnessDisabled(){return!this.uniforms[0].data[0]},set brightnessDisabled(e){this.uniforms[0].data[0]=+!e},get contrastDisabled(){return!this.uniforms[1].data[0]},set contrastDisabled(e){this.uniforms[1].data[0]=+!e},uniforms:[{name:"u_brEnabled",type:"i",data:[1]},{name:"u_ctEnabled",type:"i",data:[1]},{name:"u_brightness",type:"f",data:[e]},{name:"u_contrast",type:"f",data:[t]}]}},hueSaturation:function({hue:e=0,saturation:t=1}={}){return{vertex:{uniform:{u_hue:"float",u_saturation:"float"},constant:"\nconst mat3 lummat = mat3(\n lumcoeff,\n lumcoeff,\n lumcoeff\n);\nconst mat3 cosmat = mat3(\n vec3(0.787, -0.715, -0.072),\n vec3(-0.213, 0.285, -0.072),\n vec3(-0.213, -0.715, 0.928)\n);\nconst mat3 sinmat = mat3(\n vec3(-0.213, -0.715, 0.928),\n vec3(0.143, 0.140, -0.283),\n vec3(-0.787, 0.715, 0.072)\n);\nconst mat3 satmat = mat3(\n vec3(0.787, -0.715, -0.072),\n vec3(-0.213, 0.285, -0.072),\n vec3(-0.213, -0.715, 0.928)\n);",main:"\n float angle = (u_hue / 180.0) * 3.14159265358979323846264;\n v_hueRotation = lummat + cos(angle) * cosmat + sin(angle) * sinmat;\n v_saturation = lummat + satmat * u_saturation;"},fragment:{uniform:{u_hueEnabled:"bool",u_satEnabled:"bool",u_hue:"float",u_saturation:"float"},main:"\n if (u_hueEnabled) {\n color = vec3(\n dot(color, v_hueRotation[0]),\n dot(color, v_hueRotation[1]),\n dot(color, v_hueRotation[2])\n );\n }\n\n if (u_satEnabled) {\n color = vec3(\n dot(color, v_saturation[0]),\n dot(color, v_saturation[1]),\n dot(color, v_saturation[2])\n );\n }\n\n color = clamp(color, 0.0, 1.0);"},varying:{v_hueRotation:"mat3",v_saturation:"mat3"},get hue(){return this.uniforms[2].data[0]},set hue(e){this.uniforms[2].data[0]=parseFloat(e)},get saturation(){return this.uniforms[3].data[0]},set saturation(e){this.uniforms[3].data[0]=parseFloat(Math.max(0,e))},get hueDisabled(){return!this.uniforms[0].data[0]},set hueDisabled(e){this.uniforms[0].data[0]=+!e},get saturationDisabled(){return!this.uniforms[1].data[0]},set saturationDisabled(e){this.uniforms[1].data[0]=+!e},uniforms:[{name:"u_hueEnabled",type:"i",data:[1]},{name:"u_satEnabled",type:"i",data:[1]},{name:"u_hue",type:"f",data:[e]},{name:"u_saturation",type:"f",data:[t]}]}},duotone:function({dark:e=[.7411764706,.0431372549,.568627451,1],light:t=[.9882352941,.7333333333,.05098039216,1]}={}){return{fragment:{uniform:{u_duotoneEnabled:"bool",u_light:"vec4",u_dark:"vec4"},main:"\n if (u_duotoneEnabled) {\n vec3 gray = vec3(dot(lumcoeff, color));\n color = mix(u_dark.rgb, u_light.rgb, gray);\n }"},get light(){return this.uniforms[1].data.slice(0)},set light(e){e.forEach(((e,t)=>{Number.isNaN(e)||(this.uniforms[1].data[t]=e)}))},get dark(){return this.uniforms[2].data.slice(0)},set dark(e){e.forEach(((e,t)=>{Number.isNaN(e)||(this.uniforms[2].data[t]=e)}))},get disabled(){return!this.uniforms[0].data[0]},set disabled(e){this.uniforms[0].data[0]=+!e},uniforms:[{name:"u_duotoneEnabled",type:"i",data:[1]},{name:"u_light",type:"f",data:t},{name:"u_dark",type:"f",data:e}]}},transparentVideo:function(){return{vertex:{uniform:{u_texOffset:"vec2"},main:"v_texAlphaCoord = v_texCoord + u_texOffset;"},fragment:{uniform:{u_tvEnabled:"bool"},main:"\n if (u_tvEnabled) {\n alpha *= dot(lumcoeff, texture2D(u_source, v_texAlphaCoord).rgb);\n\n // transform alpha values from sRGB source to linearRGB - this cleans up the rim from the result\n float linear;\n if (alpha <= 0.04045) {\n linear = alpha / 12.92;\n }\n else {\n linear = pow((alpha + 0.055) / 1.055, 2.4);\n }\n\n alpha = linear;\n\n if (alpha < 0.04) {\n alpha = 0.0;\n }\n else if (alpha > 0.96) {\n alpha = 1.0;\n }\n }"},get disabled(){return!this.uniforms[0].data[0]},set disabled(e){this.uniforms[0].data[0]=+!e},varying:{v_texAlphaCoord:"vec2"},uniforms:[{name:"u_tvEnabled",type:"i",data:[1]},{name:"u_texOffset",type:"f",data:[0,-.5]}],attributes:[{name:"a_texCoord",data:new Float32Array([0,.5,0,1,1,.5,1,.5,0,1,1,1]),size:2,type:"FLOAT"}]}}},Kampos:pn},En=r(67740);const{Kampos:Tn,effects:vn}=_n;Tn.prototype.getRequestFrame=function(){return"requestVideoFrameCallback"in HTMLVideoElement.prototype?e=>{var t;return null==(t=this.media)?void 0:t.requestVideoFrameCallback(e)}:window.requestAnimationFrame},Tn.prototype.play=function(){if(!this.animationFrameId){const e=this.getRequestFrame(),t=()=>{const n=this.media;this.animationFrameId=e(t),n&&n.readyState>=n.HAVE_CURRENT_DATA&&(!n.paused&&!n.ended||this._needsRedraw)&&(this._needsRedraw=!1,this.draw())};this.animationFrameId=e(t)}};function In(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255,1]:e}const bn=function(e){void 0===e&&(e={});const t=[vn.transparentVideo()],n="brightness"in e,r="contrast"in e;if(n||r){const a=vn.brightnessContrast();n&&(a.brightness=e.brightness),r&&(a.contrast=e.contrast),t.push(a)}if(e.duotoneDark&&e.duotoneLight){const n=vn.duotone();n.dark=In(e.duotoneDark),n.light=In(e.duotoneLight),t.push(n)}const a="hue"in e,i="saturation"in e;if(a||i){const n=vn.hueSaturation();a&&(n.hue=e.hue),i&&(n.saturation=e.saturation),t.push(n)}return t},wn=e=>e.readyState>=e.HAVE_CURRENT_DATA,Ln={count:0,set:new Set,add(e){return!!Ln.set.has(e)||Ln.set.size<8&&(Ln.set.add(e),Ln.count=Ln.set.size,!0)},remove(e){Ln.set.delete(e),Ln.count=Ln.set.size}};let yn=Ln;u()&&(window.__wixWebGLContextManager__?yn=window.__wixWebGLContextManager__:window.__wixWebGLContextManager__=Ln);const xn=!(!u()||window.CSS&&window.CSS.supports("(mask-repeat: no-repeat) or (-webkit-mask-repeat: no-repeat)")),An=u()&&En.w1(window);var Rn=e=>{var t;const{id:r,className:a,customClassNames:o=[],translations:s,mediaControls:l,containerRootClassName:h,compRef:m,fillLayers:f,reducedMotion:g=!1,isMobileView:p,audioEnabled:E,hasAudio:T,hasAudioRollIn:v,muted:I,autoplay:b,canReplay:w,hasMask:L,animatePoster:y,filterEffect:x,isTransparent:A=!1,alt:R,updateState:C,onPlay:S,onPause:M,onEnded:O,onProgress:P,getPlaceholder:G,shouldShowTransparentVideoPosterOnStop:F}=e,N=i.useRef(null),k=i.useRef(null),U=i.useRef(null),B=i.useRef(null),H=i.useRef(null),D=i.useRef(null),$=i.createRef(),[Y,V]=i.useState(g);i.useEffect((()=>{V(g)}),[g]);const j=b&&!Y,z=Y||e.hasClick,W=Y||e.canClickPause,q=!Y&&e.hasRollIn,Z=!Y&&e.canRollPause,X=i.useCallback((e=>{var t,n;if(!C)return;const r="on"!==(null==(t=N.current)?void 0:t.dataset.audio),a=+((null==(n=N.current)?void 0:n.dataset.volume)||1),i=e||{paused:!0,currentTime:0,duration:0,volume:a,muted:r};C({isPlaying:!i.paused,currentTime:i.currentTime||0,duration:i.duration||0,volume:100*a,isMuted:r,shouldPlay:b}),e&&(e.volume=a)}),[b,C]),[K,J]=i.useState(!A||!An),[Q,ee]=i.useState(!!A&&!K),te=!(!L||!xn),ne=i.useMemo((()=>K&&!Q),[K,Q]),re=i.useRef(null);A&&K&&!re.current&&(re.current=function(e){let{filterEffect:t,playerRef:n,videoRef:r,canvasRef:a,contextRef:i,kampos:o,setCanPlayTV:s}=e,c=!1,u=!1;function d(){r.current&&n.current&&(r.current.removeEventListener("seeked",d),n.current.dataset.showCanvas="",u=!0)}const l={initKampos(){try{o.current=new Tn({target:a.current,effects:bn(t||{}),onContextLost:()=>{const e=o.current._source&&o.current._source.media;e&&(e.ended||e.paused)&&(o.current._needsRedraw=!0),this.stopKampos(),c&&this.playKampos()}}),o.current.hasContext=!0}catch(e){return yn.remove(i),s(!1),void(u&&l.showPoster())}if(!r.current)return;const e=()=>{var t;r.current&&(o.current.setSource({width:(t=r.current)&&t.videoWidth||0,height:t&&t.videoHeight/2||0,media:t}),l.playKampos(),r.current.removeEventListener("loadeddata",e,!1))};wn(r.current)?e():r.current.addEventListener("loadeddata",e,!1)},playKampos(){if(!n.current||!a.current)return;let e;e=o.current?o.current.hasContext||yn.add(i):!Tn.preventContextCreation&&yn.add(i),e?o.current&&o.current.config?(o.current.lostContext&&o.current.restoreContext(),o.current.hasContext=!0,o.current.play(),!u&&o.current.media&&wn(o.current.media)&&"playing"in n.current.dataset&&l.removePoster()):l.initKampos():u&&l.showPoster()},stopKampos(){yn.remove(i),o.current.hasContext=!1,o.current.stop()},killKampos(){var e;o.current&&(l.stopKampos(),o.current.destroy()),null==(e=r.current)||e.removeEventListener("seeked",d)},removePoster(){const e=r.current,t=n.current;!u&&t&&e&&o.current&&((e.paused||e.ended||o.current._needsRedraw)&&(o.current._needsRedraw=!1,o.current.draw()),e.addEventListener("seeked",d),e.currentTime=0)},showPoster(){n.current&&r.current&&(delete n.current.dataset.showCanvas,u=!1)},onViewEnter(){c=!0,l.playKampos()},onViewLeave(){c=!1,o.current&&o.current.hasContext&&l.stopKampos()}};return l}({filterEffect:x,playerRef:N,videoRef:k,canvasRef:U,contextRef:$,kampos:D,setCanPlayTV:J}));const ae=i.useRef(null);function ie(){const e={play:[],pause:[],ended:[],timeupdate:[]};if(C){const t=e=>C({isPlaying:!e.target.paused,duration:e.target.duration}),n=e=>C({currentTime:e.target.currentTime});e.loadeddata=[e=>{X(e.target)}],e.play.push(t),e.pause.push(t),e.ended.push(t),e.timeupdate.push(n)}return A&&re.current&&e.play.push(re.current.removePoster),S&&e.play.push((()=>S({type:"onPlay"}))),M&&e.pause.push((()=>M({type:"onPause"}))),O&&e.ended.push((()=>O({type:"onEnded"}))),P&&e.timeupdate.push((()=>P({type:"onProgress"}))),e}let oe=!1;ae.current||(ae.current=ie(),oe=!0),i.useEffect((()=>{oe||(ae.current=ie())}),[S,M,O,P,A,X,C]);const se=E&&T,ce=i.useCallback((()=>{var e;F&&(null==(e=re.current)||e.showPoster())}),[F]),{videoAPI:ue,onClick:de,onMouseEnter:le,onMouseLeave:he,onMouseMove:me,onKeyDown:fe,mediaHandler:ge,setAudioContext:pe,MEDIA_EVENTS:_e}=i.useMemo((()=>function(e){var t;let n,{playerRef:r,videoRef:a,playButtonRef:i,audioRef:o,isMobileView:s,autoplay:c,hasAudio:d,hasClick:l,hasRollIn:h,hasAudioRollIn:m,canClickPause:f,canRollPause:g,canReplay:p,extraMediaHandlers:_={},updateState:E=()=>{},onStop:T}=e,v=+((null==(t=r.current)?void 0:t.dataset.volume)||1);function I(e){if(!r.current||!a.current)return;const t="boolean"==typeof e?e:!a.current.muted;A=!t,t?b.mute():b.unmute()}const b={setVolume(e){v=e,a.current&&(a.current.volume=v),r.current&&(r.current.dataset.volume=v.toString())},play(e){r.current&&a.current&&(e&&(r.current.dataset.playing="",E({shouldPlay:!0})),i.current&&i.current.setAttribute("aria-pressed","true"),a.current.play(),R=!0)},pause(){r.current&&a.current&&(delete r.current.dataset.playing,i.current&&i.current.setAttribute("aria-pressed","false"),a.current.pause(),E({shouldPlay:!1}))},load:()=>{var e;return null==(e=a.current)?void 0:e.load()},stop(){r.current&&a.current&&(delete r.current.dataset.playing,i.current&&i.current.setAttribute("aria-pressed","false"),T&&T(),a.current.pause(),a.current.currentTime=0,E({shouldPlay:!1}))},togglePlay(){a.current&&(a.current.paused?b.play(!0):b.pause())},mute(){r.current&&a.current&&(a.current.muted=!0,r.current.dataset.audio="off",o.current&&o.current.setAttribute("aria-pressed","true"),E({isMuted:!0}))},unmute(e){if(!r.current||!a.current)return;const t=r.current,n=a.current;e?G(n):n.muted=!1,t.dataset.audio="on",o.current&&o.current.setAttribute("aria-pressed","false"),E({isMuted:!1})}};let w,L,y,x=!1,A=d,R=c||!l;const C={handleEvent(e){const t=e.type,n=r.current;"loadeddata"===t&&n&&(n.dataset.canPlay=""),"ended"===t&&n&&(p||(x=!0,n.dataset.stop=""),delete n.dataset.playing),_[t]&&_[t].length&&_[t].forEach((t=>t(e)))}},S=e=>{n&&n.resume();const t=r.current,i=a.current,s=o.current;t&&i&&!x&&(d&&s&&(O(t),s.contains(e.target))?I():i.paused?b.play(!0):f&&b.pause())},M=e=>{n&&n.resume();const t=r.current,i=a.current,s=o.current;if(!t||!i||x)return;const u=!c&&!t.dataset.touched,m="on"===t.dataset.touched;d&&(O(t),s&&s.contains(e.target))?I():((u||m)&&(i.paused?b.play(!0):(f||g)&&b.pause()),(l||h)&&(clearTimeout(y),t.dataset.touched="on",y=window.setTimeout((()=>t.dataset.touched="off"),1400)))},O=e=>{e.dataset.showAudio="",clearTimeout(L),L=window.setTimeout((()=>{delete e.dataset.showAudio}),2e3)},P=e=>{clearTimeout(L),delete e.dataset.showAudio},G=e=>{e.volume=0,e.muted=!1;let t=0;window.clearInterval(w),w=window.setInterval((()=>{t+=.2,t>=v?(e.volume=v,window.clearInterval(w)):e.volume=t}),200)},F=e=>{e.volume=v;let t=1;window.clearInterval(w),w=window.setInterval((()=>{t-=.2,t<=0?(e.volume=0,e.muted=!0,window.clearInterval(w)):e.volume=t}),200)},N=u()&&"ontouchend"in window&&s,k=s?void 0:e=>{if(![...Jt,...Qt].includes(e.key))return;e.preventDefault();const t=r.current,n=a.current,i=o.current;t&&n&&!x&&(i&&i.contains(e.target)?I():b.togglePlay())};let U;N?(d||l||h)&&(U=M):(d||l)&&(U=S);const B=!N&&(d||h||l)?()=>{const e=r.current,t=a.current;if(e&&t&&!x&&(h?b.play():l&&(e.dataset.rollIn=""),d&&R)){O(e);const r=!n||["running","interrupted"].includes(n.state);A&&r&&(m||h)&&t.muted&&b.unmute(!0)}}:void 0;return{videoAPI:b,onClick:U,onMouseEnter:B,onMouseLeave:!N&&(d||g||l)?()=>{const e=r.current,t=a.current;e&&t&&(g?t.pause():l&&delete e.dataset.rollIn,d&&(P(e),m&&!t.muted&&F(t)))}:void 0,onMouseMove:!N&&d?()=>{const e=r.current;e&&d&&R&&O(e)}:void 0,onKeyDown:k,mediaHandler:C,setAudioContext:function(){const e=window.AudioContext||window.webkitAudioContext;u()&&e&&a.current&&(n=new e)},MEDIA_EVENTS:new Set([...Object.keys(_),"loadeddata","ended"])}}({playerRef:N,videoRef:k,playButtonRef:B,audioRef:H,isMobileView:p,autoplay:j,hasAudio:se,hasClick:z,hasRollIn:q,hasAudioRollIn:v,canClickPause:W,canRollPause:Z,canReplay:w,extraMediaHandlers:ae.current||{},updateState:C,onStop:ce})),[p,j,z,q,v,W,Z,w,C,se,ce]);return Vt((()=>{var e;if(ne&&N.current&&(H.current||(H.current=N.current.querySelector("[data-audio-mute]"))),ee(te),null!=f&&null!=(e=f.video)&&null!=(e=e.videoInfo)&&e.isVideoDataExists||!N.current||delete N.current.dataset.showCanvas,!(te||A&&!K)&&(A||se||z)){var t,n;const e=function(e){let{playerRef:t,videoRef:n,onViewEnter:r,onViewLeave:a}=e;if(!u())return;const i={visible:!window.document.hidden,intersecting:!1},o=()=>{n.current&&t.current&&"playing"in t.current.dataset&&(i.visible=!window.document.hidden,i.visible&&i.intersecting?n.current.play():n.current.pause())};window.document.addEventListener("visibilitychange",o);let s=null;return t.current&&"function"==typeof window.IntersectionObserver&&(s=new window.IntersectionObserver((e=>{const o=t.current,s=n.current;s&&o&&e.forEach((e=>{s&&e.target===o&&(i.intersecting=e.isIntersecting,i.visible&&i.intersecting?(null==r||r(),"playing"in o.dataset&&s.src&&s.play()):(null==a||a(),s.pause()))}))})),s.observe(t.current)),function(){window.document.removeEventListener("visibilitychange",o),s&&(s.disconnect(),s=null)}}({playerRef:N,videoRef:k,onViewEnter:null==(t=re.current)?void 0:t.onViewEnter,onViewLeave:null==(n=re.current)?void 0:n.onViewLeave});return function(){var t;null==e||e(),null==(t=re.current)||t.killKampos()}}}),[A,K,re.current,se]),i.useEffect((()=>{if(A&&!K)return;const e=k.current,t=new Set(Array.from(_e).concat(Object.keys(ae.current||{}).filter((e=>ae.current&&ae.current[e]&&ae.current[e].length))));return t.forEach((t=>{e&&!te&&("loadeddata"===t&&e.readyState>=e.HAVE_CURRENT_DATA?(ge.handleEvent({type:t}),window.setTimeout((()=>X(k.current)),200)):e.addEventListener(t,ge))})),pe&&!te&&pe(),()=>{t.forEach((t=>{e&&e.removeEventListener(t,ge)}))}}),[A,K,pe,ge,_e,te,C,X,null==f||null==(t=f.video)||null==(t=t.videoInfo)?void 0:t.isVideoDataExists]),i.useImperativeHandle(m,(()=>ue)),i.useEffect((()=>{const e=N.current;!j&&e&&e.removeAttribute("data-playing")}),[j]),i.createElement("div",n()({id:r},d(e),{ref:N,className:c(zt,h,a,_(jt.root,...o)),onClick:ne?de:void 0,onMouseEnter:ne?le:void 0,onMouseLeave:ne?he:void 0,onMouseMove:ne?me:void 0,onKeyDown:ne?fe:void 0,"data-audio":I?"off":"on","data-has-play":ne&&(z||q)?"":void 0,"data-no-audio":ne&&se?void 0:"","data-playing":ne&&j?"":void 0,"data-stop":ne?void 0:"","data-animate-poster":A?y:void 0,"data-has-alpha":A?"true":void 0}),i.createElement("div",{ref:B,className:c(Wt,{[Zt]:A}),tabIndex:0,role:"button","aria-label":R+" "+s.ariaLabel,"aria-pressed":j?"true":"false"},i.createElement(Yt,n()({},f,{getPlaceholder:G,reducedMotion:Y,videoRef:k,canvasRef:A?U:void 0,extraClass:qt}))),ne?l:null)};const Cn=(e,t)=>{const r=i.createElement(g,n()({id:e.id},e.meshProps),e.children);return i.createElement(Rn,n()({},e,{compRef:t,mediaControls:r}))};const Sn=e=>e.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase()));var Mn;const On={MediaPlayer_videoBox:{component:i.forwardRef(Cn),controller:(Mn=e=>{let{stateValues:t,mapperProps:n}=e;const{reducedMotion:r,experiments:a={}}=t,i=((e,t)=>!0===e[t]||"true"===e[t]||"new"===e[t])(a,"specs.thunderbolt.isClassNameToRootEnabled");return{...n,reducedMotion:r,isClassNameToRootEnabled:i}},{useComponentProps:(e,t,n)=>{const r=(e=>({...e,updateStyles:t=>{const n=Object.entries(t).reduce(((e,t)=>{let[n,r]=t;return{...e,[(a=n,a.startsWith("--")?n:Sn(n))]:void 0===r?null:r};var a}),{});e.updateStyles(n)}}))(n);return Mn({mapperProps:e,stateValues:t,controllerUtils:r})}})}}}(),a}()})); //# sourceMappingURL=https://static.parastorage.com/services/editor-elements-library/dist/thunderbolt/rb_wixui.thunderbolt[MediaPlayer_videoBox].c9f1139d.bundle.min.js.map